-- GENERATED SPELL FOR [Corruptor] --


function spell0_12217(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(21068,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12217', 26000, 1)
end

function spell1_12217(pUnit, Event) --@Noxious Catalyst,n/a--
pUnit:FullCastSpellOnTarget(5413,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12217', 0, 1)
end

function Sorts_12217(pUnit, Event)
local choix_sorts_12217 = math.random(0, 1)
if choix_sorts_12217 == 0 then
pUnit:RegisterEvent('spell0_12217', 1, 1)
end
if choix_sorts_12217 == 1 then
pUnit:RegisterEvent('spell1_12217', 1, 1)
end
end

function mob12217_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12217', math.random(1500, 3000), 1)
end

function mob12217_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12217_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12217_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12217, 1, 'mob12217_Action')
RegisterUnitEvent(12217, 2, 'mob12217_Leave')
RegisterUnitEvent(12217, 3, 'mob12217_Kill')
RegisterUnitEvent(12217, 4, 'mob12217_Die')
